package com.hyk.feign;

import com.hyk.config.auth.OAuth2FeignConfig;
import com.hyk.dto.MarketDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "exchange-service",
            configuration = OAuth2FeignConfig.class,
            contextId = "market",
            path = "/markets")
public interface MarketFeign {

    @GetMapping("/getMarketBySymbol")
    MarketDto getMarketBySymbol(@RequestParam("symbol") String symbol);

    @GetMapping("/getMarketBySymbols")
    List<MarketDto> getMarketBySymbols(@RequestParam("symbol") List<String> symbol);
}
